package com.android.petswitch;

import java.net.URL;

import android.os.Handler;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.Transformation;

public abstract class Slide {
	public static final int SLIDE_DIRECTION_FORWARD = 0;
	public static final int SLIDE_DIRECTION_BACKWARD = 1;
	// if the slide is loaded or not.
	private boolean slideLoaded;
	// uri of this slide - either uri or drawable can be active.
	private URL slideUri;
	// animation to apply when hiding slide
	private Animation hideAnim;
	// animation to apply when showing slide
	private Animation showAnim;
	// holds the transformation generated by applying the currently running
	// animation
	private Transformation tranform;
	// animation callback handler
	private Handler handler;

	public void clearSlide() {
		slideLoaded = false;
		slideUri = null;
		hideAnim = null;
		showAnim = null;
		tranform = null;
	}

	public URL getSlideUri() {
		return slideUri;
	}

	public void setSlideUri(URL slideUri) {
		this.slideUri = slideUri;
	}

	public void setSlideLoaded(boolean slideLoaded) {
		this.slideLoaded = slideLoaded;
	}

	public boolean isSlideLoaded() {
		return this.slideLoaded;
	}

	public Animation getShowAnimation() {
		return showAnim;
	}

	public void setShowAnimation(AnimationSet anim) {
		showAnim = anim;
	}

	public Transformation getTransformation() {
		return tranform;
	}

	public void setTransformation(Transformation transformation) {
		this.tranform = transformation;
	}

	public Handler getHandler() {
		return handler;
	}

}
